/**
 * post
 */
// ckeditor
var smallEditor = CKEDITOR.replace( 'content', {
	toolbarGroups : [
		{ name: 'insert' },
		{ name: 'forms' },
		'/',
		{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
		{ name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align' ] },
		'/',
		{ name: 'styles' },
		{ name: 'colors' },
		{ name: 'document',    groups: [ 'mode', 'document' ] }
	],
	extraPlugins : 'insertpre',
	
	filebrowserBrowseUrl : Y._ROOT_ +'/Public/js/ckfinder/ckfinder.html',
	filebrowserImageBrowseUrl : Y._ROOT_ +'/Public/js/ckfinder/ckfinder.html?Type=Images',
	filebrowserFlashBrowseUrl : Y._ROOT_ +'/Public/js/ckfinder/ckfinder.html?Type=Flash',
	filebrowserUploadUrl : Y._ROOT_ +'/Public/js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
	filebrowserImageUploadUrl : Y._ROOT_ +'/Public/js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
	filebrowserFlashUploadUrl : Y._ROOT_ +'/Public/js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'
	
	,height:400
	,width:660
});

function doPost() {
	var err = '';
	var content = smallEditor.getData();
	
	if(content == '') {
		err += '请输入内容 \n';
	}
	
	if(err != '') {
		alert(err);
	} else {
		window.f1.submit();
	}
}

